package nz.ac.massey.cs.plot;

import java.awt.Color;
import java.awt.Font;
import java.awt.Graphics;
import java.awt.Graphics2D;
import java.awt.Stroke;
import java.io.IOException;

import javax.swing.ImageIcon;

public interface Plot {
    void drawBackground(Graphics2D g);

    void drawTitle(Graphics2D g);

    void drawXAxis(Graphics2D g);

    void drawXIntervals(Graphics2D g);

    void drawXLabel(Graphics2D g);

    void drawYAxis(Graphics2D g);

    void drawYIntervals(Graphics2D g);

    void drawYLabel(Graphics2D g);

    Color getBackgroundColor();

    Stroke getDashedStroke();

    Color getEquationColor();

    Color getGridLineColor();

    ImageIcon getImageIcon();

    Color getIntervalColor();

    Color getLineColor();

    Stroke getNormalStroke();

    Color getOriginAxisColor();

    Stroke getOriginStroke();

    char getPlotChar();

    Color getPlotColor();

    Font getPlotFont();

    Color getRegressionLineColor();

    String getTitle();

    Color getTitleColor();

    Font getTitleFont();

    double getTitleHeight();

    Stroke getTitleStroke();

    int getXClasses();

    Color getXYLabelColor();

    double getXmax();

    double getXmin();

    Color getXyLabelColor();

    Font getXyLabelFont();

    double getYClasses();

    double getYmax();

    double getYmin();

    int gethOffset();

    double getxAxisEnd();

    double getxAxisStart();

    double getxClassWidth();

    int getxClasses();

    Font getxIntervalFont();

    String getxLabel();

    double getxOffset();

    double getyAxisEnd();

    double getyAxisStart();

    double getyClassHeight();

    int getyClasses();

    Font getyIntervalFont();

    String getyLabel();

    double getyOffset();

    boolean isShowXGridLines();

    boolean isShowYGridLines();

    void redraw(Graphics graphics);

    void setBackgroundColor(Color backgroundColor);

    void setDashedStroke(Stroke dashedStroke);

    void setEquationColor(Color equationColor);

    void setGridLineColor(Color gridLineColor);

    void setIntervalColor(Color intervalColor);

    void setLineColor(Color lineColor);

    void setNormalStroke(Stroke normalStroke);

    void setOriginAxisColor(Color originAxisColor);

    void setOriginStroke(Stroke originStroke);

    void setPlotChar(char plotChar);

    void setPlotColor(Color plotColor);

    void setPlotFont(Font plotFont);

    void setRegressionLineColor(Color regressionLineColor);

    void setShowXGridLines(boolean showXGridLines);

    void setShowYGridLines(boolean showYGridLines);

    void setTitle(String title);

    void setTitleColor(Color titleColor);

    void setTitleFont(Font titleFont);

    void setTitleHeight(double titleHeight);

    void setTitleStroke(Stroke titleStroke);

    void setXmax(double xmax);

    void setXmin(double xmin);

    void setXyLabelColor(Color xyLabelColor);

    void setXyLabelFont(Font xyLabelFont);

    void setYmax(double ymax);

    void setYmin(double ymin);

    void setxAxisStart(double xAxisStart);

    void setxClasses(int xClasses);

    void setxIntervalFont(Font xIntervalFont);

    void setxLabel(String xLabel);

    void setxOffset(double xOffset);

    void setyAxisStart(double yAxisStart);

    void setyClasses(int yClasses);

    void setyIntervalFont(Font yIntervalFont);

    void setyLabel(String yLabel);

    void setyOffset(double yOffset);

    /**
     * saves the current histogram as a png image
     *
     * @param path the image file path
     * @throws IOException if the path is incorrect or not writable
     */
    void toPNG(String path) throws IOException;


}
